<script lang="ts" setup>
import { LeftCircleOutlined, RightCircleOutlined } from "@ant-design/icons-vue";
import type { modaldataType } from "../types/idnex";
const props = defineProps({
  // 图片数据
  modaldata: {
    type: Array as PropType<modaldataType[]>,
  },
});
</script>

<template>
  <a-carousel arrows>
    <template #prevArrow>
      <div class="custom-slick-arrow" style="left: 10px; z-index: 1">
        <LeftCircleOutlined />
      </div>
    </template>
    <template #nextArrow>
      <div class="custom-slick-arrow" style="right: 10px">
        <RightCircleOutlined />
      </div>
    </template>
    <div v-for="(item, index) in props.modaldata" :key="index" class="carouselCon">
      <div>
        <div class="DepositiontopS" />
        <img class="DepositionImg" :src="item.url">
        <div class="DepositionTopping">
          🐝 置顶
        </div>
      </div>
      <div class="DepositionText">
        <div class="TextFle">
          <p># 运维</p>
          <p>496阅读</p>
          <p>878字</p>
          <p>20条评论</p>
        </div>

        <p class="DepTele">
          部署LNMP环境
        </p>
        <p class="textPler">
          LNMP是指一组通常一起使用来运行动态网站或者服务器的自由软件名称首字母缩写。L指Linux，N指Nginx，M一般指MySQL，也可以指MariaDB，P一般指PHP，也可以指Perl或Python。
          LNMP代表的就是：Linux系统下Nginx+MySQL+PHP这种网站服务器架构。Linux是一类Unix计算机操作系统的统称，是目前最流行的免费操作系统。代表版本有：debian、centos、ubuntu、fedora、gentoo等。
          Nginx是一个高性能的HTTP和反向代理服务器，也是一个IMAP/POP3/SMTP代理服务器。
          Mysql是一个小型关系型数据库管理系统。
        </p>
        <p class="Date">
          <a-avatar shape="square" :size="18" src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" />
          SUN发表于: 2022/07/05
        </p>
      </div>
    </div>
  </a-carousel>
</template>

<style></style>

<style scoped lang="less">
/* For demo */
:deep(.carouselCon) {
  margin: 10px auto;
  max-width: 1340px;
  overflow: hidden;
  object-fit: cover;
  height: 280px;
  display: flex !important;
  justify-content: space-between;
  flex-wrap: nowrap;
  align-items: center;
  border-radius: 10px;
  box-shadow: 0 10px 15px -3px rgba(238, 238, 238, 0.1), 0 4px 6px -4px rgb(0 0 0 / .1);
}

:deep(.slick-arrow.custom-slick-arrow) {
  width: 25px;
  height: 25px;
  font-size: 25px;
  color: #fff;
  background-color: rgba(31, 45, 61, 0.11);
  transition: ease all 0.3s;
  opacity: 0.3;
  z-index: 1;
}

:deep(.slick-arrow.custom-slick-arrow:before) {
  display: none;
}

:deep(.slick-arrow.custom-slick-arrow:hover) {
  color: #fff;
  opacity: 0.5;
}

:deep(.slick-slide .DepositiontopS) {
  margin: 10px auto;
  position: absolute;
  top: 0;
  width: 1340px;
  min-width: 980px !important;
  height: 280px;
  background-image: url("http://blog-imges-v1.oss-cn-beijing.aliyuncs.com/blog/images/icon/watermark.png");
  border-radius: 10px;
  z-index: 2;
}

:deep(.slick-slide .DepositionImg) {
  width: 800px;
  margin-top: 10px;
  position: absolute;
  top: 0;
  height: 280px;
  border-radius: 10px 0 0 10px;
  overflow: hidden;
  object-fit: cover;
  clip-path: polygon(0 0, 90% 0%, 100% 100%, 0% 100%);

}

:deep(.slick-slide .DepositionTopping) {
  position: absolute;
  top: 0;
  margin: 15px 5px;
  background-color: #fff;
  padding: 5px 14px;
  z-index: 4;
  border-radius: 5px;
  font-size: 12px;
  text-align: center;
}

:deep(.slick-slide .DepositionText) {
  width: 620px;
  position: absolute;
  margin-left: 720px;
  height: 280px;
  color: #fff;
  background-color: #525252;
  clip-path: polygon(0 0, 100% 0%, 100% 100%, 12% 100%);
  padding-left: 65px;
  padding-top: 32px;
  padding-right: 20px;
  border-radius: 0 10px 10px 0;
  z-index: 4;

  .TextFle {
    display: flex;
    font-size: 12px;

    p {
      padding: 3px 10px;
      margin-bottom: 3px;
    }

    p:nth-child(1) {
      background-color: #fff;
      color: #000;
      border-radius: 5px;
    }
  }
  .DepTele {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .Date {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 12px;
  }
  .textPler {
    font-size: 12px;
  }
  .textPler {
    font-size: 12px;
  }
}

:deep(.slick-dots-bottom) {
  bottom: 30px;
}
</style>
